package cn.ywang.pattern.guava;

import com.google.common.eventbus.Subscribe;

/**
 * 基于Guava实现的订阅者
 *
 * @author BeatificWang
 * @date 2019/3/20 23:32
 */
public class GuavaEvent {

	private String name;

	public GuavaEvent(String name) {
		this.name = name;
	}

	@Subscribe
	public void subscribe(Question question) {
		System.out.println("Hi " + this.name + ", 您收到一个新的问题：" + question);
	}
}
